package com.lsy.common.result;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

@Data
@ToString
@EqualsAndHashCode(callSuper = true)
public class CommonResultException extends Exception{
	private Integer code;
	private String msg;
	
	public CommonResultException(CommonResult<Object> result){
		this.code = result.getCode();
		this.msg = result.getMsg();
	}
	
	public CommonResultException(Integer code, String msg) {
		this.code = code;
		this.msg = msg;
	}
}